COMPUTATIONAL PHYSICS LABORATORY
2° Year of course - First semester
Frequency Not mandatory
- 6 CFU
- 72 hours
- ITALIANO
- Trieste
- Opzionale
- Standard teaching
- Oral Exam
- SSD FIS/01
The course intends to provide the student with some fundamental numerical algorithms and the basic tools for application in numerical codes for solving problems of classical physics and simple problems of quantum physics.
The course has the following specific objectives:
- KNOWLEDGE AND UNDERSTANDING: provide the student with the fundamental conceptual elements of scientific computing and numerical simulations of both deterministic and stochastic type, and some algorithms for solving problems.
- ABILITY TO APPLY KNOWLEDGE AND UNDERSTANDING: provide the student with the basic tools to be able to identify a solution algorithm, implement it in a programming language, perform a numerical simulation and analyze and visualize the results obtained.
- MAKING JUDGMENTS: make the student able to apply concepts and tools learned in a critical way, also identifying unreliable solutions (for example, recognizing if an algorithm has been implemented correctly, using the code for cases that can be easily analytically checked (limit cases, "benchmarks")); the continuous training in the numerical solution of problems contributes to the achievement of this objective; the solution of the homeworks and the final project is a clear check.
- COMMUNICATION SKILLS: make the student able to explain what they have learned and to transmit their knowledge to others, and to be able to frame a specific problem in a broader context; the moments of interaction with the teacher and discussions with classmates contribute significantly to the achievement of this objective. The written report on the individual project and the oral exam allow to clearly verify the achievement of these skills.
- LEARNING SKILLS: make the student capable of critically learning concepts and solution tools. To facilitate this ability, the student is encouraged to interact during the lectures and in particular during the exercises, and to propose new solution algorithms or to improve the ones proposed. The homework proposed during the course helps to develop this learning ability in a gradual and progressive way, starting from simple concepts and problems to get to more complex ones.
These specific objectives are consistent with the general objectives of the course of study of training graduates with solid basic scientific preparation, problem solving skills and specific operational skills (to which this specific course contributes as regards computational skills) in the field of Physical Sciences but also in applications in various fields.
Basic knowledge about the use of computers, an operating system, scientific data visualization (plot); basic knowledge of a scientific programming language (such as Fortran 90). Standard knowledge in classical physics and statistical mechanics acquired from a technical-scientific three-year degree course; basic knowledge of quantum mechanics for some specific algorithms and their applications covered in the course.
- Errors and uncertainties in computations. Finite representation of numbers in a computer.
- Numerical methods for solving differential equations, in particular for the Schroedinger equation in one dimension and for a spherically symmetric potential.
- (Pseudo)random numbers (generators; properties; uniform distributions) - (Pseudo)random numbers with non uniform distributions inverse transformation method and other algorithms for specific distributions. Random processes: radioactive decay.
- Introduction to the Random walks; properties; Monte Carlo simulation of 1D and 2D RWs. RW to simulate diffusion processes.
- Numerical integration in 1 dimension: deterministic algorithm and error estimate; Monte Carlo algorithms (acceptance-rejection, sample mean, importance sampling) and error handling (reduction of variance: standard deviations of the mean, blocking)
- Multidimensional numerical integration: comparison between deterministic and Monte Carlo methods. One-dimensional numerical integration: gaussian quadrature; use of subroutines from Numerical Recipes (e.g. "Gauleg") Random numbers with Guassian distribution: ad- hoc algorithm; the central limit theorem.
- Metropolis Monte Carlo method for generating arbitrary nonuniform probability distributions. Reduction of variance: standard deviations of the mean (further details, rationale).
- Basic concepts of statistical mechanics, review. Order/disorder, macro/microstates, entropy (with example of an efficient computational algorithm). The Metropolis method in the canonical ensemble. The Boltzmann distribution as a result of the Metropolis method.
- The Ising model: introduction. Simulation with the Metropolis method. Equilibration. The Ising phase transition: Critical Temperature. Magnetic susceptibility and specific heat. Further details about the Ising model. Critical exponents, finite size analysis (basics).
- Lattice gas; example of vacancy diffusion on a solid or similar examples. Fractals: diffusion and aggregation. Model for surface growth. Percolation.
- Classical fluids: Monte Carlo simulation. Basic concepts of Molecular dynamics simulations.
- Monte Carlo in Quantum Mechanics: variational MC.
- Chaos and determinism. Classical billiards and chaos Logistic maps. Lyapunov exponents.
- Overview of evolutionary and epidemiological models for population dynamics.
- "Introduction to Computer simulation Methods: application to Physical Systems", H. Gould, J. Tobochnik and W. Christian, Addison Wesley (2006), III Ed.; H. Gould and J. Tobochnik, Addison Wesley (1995), II Ed.
- "Statistical and Thermal Physics", H. Gould and J. Tobochnik, Princeton University Press (2010).
- "Computational Physics: problem solving with computers", R.H. Landau, M.J. Paez, J. Wiley & Sons (1997, I ed.; 2007, II ed., enlarged, M.J. Paez and C.C. Bordeianu).
- "A Survey of Computational Physics: Introductory Computational Science", R.H. Landau, M.J. Paez and C.C. Bordeianu, Princeton University Press (2008).
- "A First Course in Scientific Computing", R.H. Landau, Princeton University Press (2005).
- "Understanding Molecular Simulations: From Algorithms to Applications", by Daan Frenkel and Berend Smit, Academic Press (2nd edition, 2001)
- Errors and uncertainties in calculations. Finite representation of numbers in a computer.
- Numerical methods for solving differential equations, with particular reference to the Schroedinger equation in one dimension and for a spherically symmetric potential.
- Random Numbers with different distributions. Monte Carlo simulation of Random Walks.
- Numerical integration in 1 dimension: deterministic and stochastic algorithms; Monte Carlo algorithms.
- Error estimate and reduction of the variance methods. Metropolis algorithm for arbitrary random number generation.
- Metropolis method in the canonical ensemble. Ising model and Metropolis-Monte Carlo simulation.
- Variational Monte Carlo in quantum mechanics (basics).
- Lattice gas (basics).
- Chaos and determinism: classical billiards and chaotic billiards, logistic maps; Lyapunov exponents.
- Fractals: diffusion and aggregation, models for surface growth simulation. Percolation.
- Biology-related models (population evolution with Lotka-Volterra eqs. and with stochastic approaches; genetic algorithms; epidemiological models)
Lectures and assisted sessions of numerical exercises in computer labs. In the lectures some problems and algorithms are discussed, and numerical exercises are proposed to the students. These include: simple introductory exercises (with implementation and use of several basic numerical analysis algorithms) for which some example codes are provided typically in Fortran 90 to recover some basic skills typical of a compiled language (e.g. precision management); for error handling; exercises for specific applications and simulations, data collection and analysis, visualization; understanding, using and reviewing already provided code and personally implementing new code and/or interfacing parts of codes in different languages.
In the time interval between the frontal lesson and the assisted exercises session, the students are invited to start affording individually the proposed exercises; then, to resume their work in the assisted exercise sessions in the computer laboratory, comparing themselves in groups and interacting with the teachers.
Video recordings of lessons (not of the assisted laboratory sessions) via MS Teams available for 12 months from the date of recording. Teaching material (lectures slides, parts of codes, other material) available on the web page of the course: https://moodle2.units.it
The course does not have the objective of teaching a specific programming language, but is an opportunity to apply IT skills, possibly learned during other training activities, in particular in the use of different languages, compiled and not compiled, their interfacing and complementarity to improve the efficiency of the codes.
The learning assessment includes ongoing homework and a final project with a written report and oral discussion. In ongoing homework (typically two or three) numerical exercises are proposed to be solved with codes provided by teachers or originally written by the students, within a certain deadline (typically about ten days from the assignment date); a short report must be delivered by uploading it to the moodle2 platform. The final assessment involves carrying out an individual numerical simulation project, chosen by the student from a list of proposed projects or something else, after agreement with the teachers. The student typically has about ten days available to carry out the project, and at the end a brief report is required, containing in a concise but exhaustive way the essential elements of the problem addressed, the solution algorithm used, the specifics of its implementation, input data, results and their analysis. The report must be delivered by email to the teachers the day before the oral discussion, which starts from the project itself and includes in-depth questions that can also extend to all the topics covered during the course. The evaluation of the final project and of the intermediate exercises (homework) contributes to the final grade (single grade, out of thirty). If the student is unable to comply with the homework assignments for justified reasons, the exam can be done by integrating the project with other numerical exercises assigned by the teachers (at least those of the homework) before the oral exam.
This course explores topics closely related to one or more objectives of the 2030 Agenda for Sustainable Development of the United Nations.
The acquisition of computational skills is useful for the digital transformation that accompanies innovation.